package com.leather.admin.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leather.admin.entity.Role;
import com.leather.common.result.Result;

public interface RoleService extends IService<Role> {

    /**
     * 增加角色
     * @param role
     * @return
     */
    Result  addRole(Role role);


    /**
     * 获得角色
     * @param roleName
     * @return
     */
    Role getRole(String roleName);


    /**
     * 根据Id获得角色
     * @param roleId
     * @return
     */
    Role getRoleById(int roleId);



    JSONArray getTreeByRoleId(Integer id);

    Result setRolePermission(int id, JSONArray datas);
}
